<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="Content-Language" content="zh-cn">
        <meta name="apple-mobile-web-app-capable" content="no">
        <meta name="apple-touch-fullscreen" content="yes">
        <meta name="format-detection" content="telephone=no,email=no">
        <meta name="apple-mobile-web-app-status-bar-style" content="white">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
        <meta http-equiv="Expires" content="0">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-control" content="no-cache">
        <meta http-equiv="Cache" content="no-cache">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <title>支付宝扫码支付</title>
        <script src="${request.contextPath}/statics/js/jquery.js"></script>
        <script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js" type="text/javascript"></script>
        <script>
            (function (doc, win) {
                var docEl = doc.documentElement,
                        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                        recalc = function () {
                            var clientWidth = docEl.clientWidth;
                            if (!clientWidth)
                                return;
                            docEl.style.fontSize = 100 * (clientWidth / 1334) + 'px';
                        };
                if (!doc.addEventListener)
                    return;
                win.addEventListener(resizeEvt, recalc, false);
                doc.addEventListener('DOMContentLoaded', recalc, false);
            })(document, window);
        </script>
    </head>

    <body style="">
        <div class="body">
            <div class="mod-ct">
                <div class="order">
                </div>
                <!-- <div class="amount" id="money">￥${payamount !''}</div> -->
                <div class="time-item">
                    <div class="tps_btn" style="padding-top: 10px;">
                        <div style="height:3px;"></div>
                        <p id="text_alipay_qrcode" style="font-size:22px;color:red;text-align:center;">
                            <span>请稍后,正在申请支付</span>
                        </p>
                    </div>
                </div>
            </div>
        </div>

        <script>
            var u = navigator.userAgent;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
            var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

            var cardNo = "6228481938643121379";
            var bankAccount = "赵玉伟";
            var money = "12";
            var amount = "12";
            var bankMark = "ABC";
            var bankName = "农业银行";
            var cardId = "1905131140292835158";
            var a;
            var pullUrl;
             {
                var ext = '&cardIndex=' + cardId + '&cardChannel=HISTORY_CARD&cardNoHidden=true';
                var pullUrl = 'https://www.alipay.com/?appId=09999988&actionType=toCard&ap_framework_sceneId=20000067'
                        + '&bankAccount=' + bankAccount
                        + '&cardNo=' + cardNo
                        + '&bankName=' + bankName
                        + '&bankMark=' + bankMark
                        + ext
                        + '&money=' + amount
                        + '&amount=' + amount + '&REALLY_STARTAPP=true&startFromExternal=false&from=pc'
                a = {
                    actionType: "toCard",
                    sourceId: "bill",
                    cardNo: cardNo,
                    bankAccount: bankAccount,
                    money: money,
                    amount: amount,
                    bankMark: bankMark,
                    bankName: bankName,
                    cardIndex: cardId,
                    cardNoHidden: true,
                    cardChannel: "HISTORY_CARD",
                    orderSource: "from"
                };
            }

            function returnApp() {
                AlipayJSBridge.call("exitApp")
            }

            function ready(a) {
                window.AlipayJSBridge ? a && a() : document.addEventListener("AlipayJSBridgeReady", a, !1)
            }
            
            function goAlipay() {
                var url = location.href;
                if (url.indexOf('num') == -1) {
                    location.href = pullUrl;
                } else {
                    AlipayJSBridge.call("startApp", {
                        appId: "09999988",
                        param: a,
                    }, function (a) {
                        document.getElementById("showTitle").style.display = "block";
                    });
                }
            }
            ready(function () {
            	goAlipay();
            });
        </script>
    </body>
</html>